package com.zhu.gmallpublisher.service.impl;

import com.zhu.gmallpublisher.bean.CategoryCommodityStats;
import com.zhu.gmallpublisher.bean.TradeMarkCommodityStats;
import com.zhu.gmallpublisher.bean.TradeMarkOrderAmountPieGraph;
import com.zhu.gmallpublisher.mapper.CommodityStatsMapper;
import com.zhu.gmallpublisher.service.CommodityStatsService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * 尚品主题服务层
 */
@Service
public class CommodityStatsServiceImpl implements CommodityStatsService {

    @Autowired
    private CommodityStatsMapper commodityStatsMapper;

    /**
     * 商品交易分析Pie
     * @param date
     * @return
     */
    @Override
    public List<TradeMarkCommodityStats> getTrademarkCommodityStatsService(Integer date) {
        return commodityStatsMapper.getTradeMarkCommodityStats(date);
    }

    /**
     * 商品主题 交易分析 饼状图
     * @param date
     * @return
     */
    @Override
    public List<TradeMarkOrderAmountPieGraph> getTmOrderAmtPieGra(Integer date) {
        return commodityStatsMapper.selectTmOrderAmtPieGra(date);
    }


    /**
     * 商品主题 各个品类分析 轮播表格
     * @param data
     * @return
     */
    @Override
    public List<CategoryCommodityStats> getCategoryCommodityStats(Integer data) {
        return commodityStatsMapper.selectCategoryCommodityStats(data);
    }


}
